﻿using Basic.FlowModel.DB;
using Basic.FlowRemoteModel;
using Basic.FlowRemoteModel.FlowApp.Model;
using WeDonekRpc.Model;

namespace Basic.FlowCollect
{
    public interface IFlowAppCollect
    {
        bool SetSettleFormId ( DBFlowApp app, long? formId );
        long Add ( FlowAppSet data );
        bool Enable ( DBFlowApp app );
        DBFlowApp Get ( long id );
        string GetAppName ( long appId );
        Result[] Gets<Result> ( FlowAppType? appType, FlowAppStatus status ) where Result : class, new();

        DBFlowApp[] Query ( FlowAppQuery query, IBasicPage paging, out int count );
        bool Set ( DBFlowApp app, FlowAppSet datum );
        bool SetFlow ( DBFlowApp app, AppFlowSet set );
        bool Stop ( DBFlowApp app );
        T Get<T> ( long appId ) where T : class, new();
        void Delete(DBFlowApp app);
    }
}